#!/bin/bash
rm *.o *.ppu ../*.o ../*.ppu testrunner
fpc -Fu.. -O2 gsortloadtest1.pp
fpc -Fu.. -O2 gsortloadtest2.pp
fpc -Fu.. -O2 gpriorityqueueloadtest1.pp
fpc -Fu.. -O2 gsetloadtest1.pp

echo 'Sorting random 1000000 integers:'
time ./gsortloadtest1 <<< '1000000' >t.out

echo 'Sorting random 10000000 integers:'
time ./gsortloadtest1 <<< '10000000' >t.out

echo 'Sorting almort ordered 1000000 integers:'
time ./gsortloadtest2 <<< '1000000' >t.out

echo 'Sorting almost ordered 10000000 integers:'
time ./gsortloadtest2 <<< '10000000' >t.out

echo 'Testing priority queue with 1000000 random integers:'
time ./gpriorityqueueloadtest1 <<< '1000000' >t.out

echo 'Testing rbset with 1000000 random integers:'
time ./gsetloadtest1 <<< '1000000' >t.out

rm t.out
